//package com.zkthink.ceres.executor.jobhandler.xsy;
//
//import com.xxl.job.core.biz.model.ReturnT;
//import com.xxl.job.core.handler.IJobHandler;
//import com.xxl.job.core.handler.annotation.JobHandler;
//import com.zkthink.xsy.love.service.XsyAdminTurnoverService;
//import com.zkthink.xsy.love.service.XsyMemberDividendService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import java.time.LocalDateTime;
//import java.time.format.DateTimeFormatter;
//
///**
// * @ClassName ComputeTurnoverHandler
// * @Description: 每天凌晨零点计算前一天的营业额, 定时任务每天零点
// * @Author ck
// * @Date 2021/11/24
// * @Version V1.0
// **/
//@JobHandler(value = "computeTurnoverHandler")
//@Component
//@Slf4j
//public class ComputeTurnoverHandler extends IJobHandler {
//
//    @Autowired
//    private XsyAdminTurnoverService xsyAdminTurnoverService;
//    @Autowired
//    private XsyMemberDividendService xsyMemberDividendService;
//
//    @Override
//    public ReturnT<String> execute2(String param) throws Exception {
//        LocalDateTime now = LocalDateTime.now().plusDays(-1);
//        DateTimeFormatter dtf2 = DateTimeFormatter.ofPattern("yyyy-MM-dd");
//        String time = dtf2.format(now);
//        //计算营业额
//        xsyAdminTurnoverService.saveTurnoverBusiDate(time);
//        //计算给客户发红包
//        xsyMemberDividendService.executeMemberHb(time);
//        return SUCCESS;
//    }
//}
